


Lesson 2 - Functions

by blipblopblork



Series: ilikeyou.js [2]
Category: Silicon Valley (TV)
Genre: Awkwardness, Computer Programming, First Time, Fluff, M/M
Language: English
Status: Completed
Published: 2015-09-14
Updated: 2015-09-14
Packaged: 2018-04-20 17:06:00
Rating: Mature
Warnings: No Archive Warnings Apply
Chapters: 1
Words: 2,213
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/4795391
Author URL: https://archiveofourown.org/users/blipblopblork/pseuds/blipblopblork
Summary: <blockquote class="userstuff">
              <p>Jared comes back for a second JavaScript lesson. He and Richard both learn a lot, and not just about programming.</p>
<p>The sequel to ilikeyou.js. Cautiously rated M for some mostly offscreen sexytimes.</p>
            </blockquote>





	Lesson 2 - Functions

Richard sat at his desk under his loft bed, desperately trying to focus. He had a million tickets to close before the sprint deadline, but all he could think about was Jared. His  _boyfriend_ Jared.

The last week had been a whirlwind. Less than a minute after Jared had left the hacker hostel after his first JavaScript lesson (after a lingering goodbye kiss that definitely ranked in Richard's Top 5 Kisses of All Time - the other four having also been delivered by Jared earlier that day), Richard had been startled by a notification chiming on his phone.

> 1 New Relationship Request  
>  Jared (Donald) Dunn  
>  | Confirm  |   |  Ignore  |

Richard had pressed "Confirm" without a second thought. He thought it might have been a little weird - weren't they supposed to talk about things before making them Facebook official? Then again, Richard didn't have much experience with relationships to begin with, so he wasn't sure, and honestly, he was grateful that Jared had spared him the awkwardness of having to initiate the "soooo, are we boyfriends?" conversation himself. Just gathering the courage probably would have taken him months.

_Boyfriend_. The word tasted funny on his tongue.  Not because Jared was male, though Richard knew he should probably mentally prepare himself for a big gay freakout somewhere down the line. He had been vaguely aware of his attraction to men before, but always told himself it was because he wanted to _be_  them and not be _with_  them. Clearly, that had been his denial speaking. But being with Jared felt right, like he'd finally gotten something he'd never known he'd always wanted. If anyone had a problem with that, they could go suck a dick. Or well, not. Richard noted to himself that he might have to amend his repertoire of insults a bit.

No, the truly strange part was just being wanted by somebody else for once. And boy, did Jared want him - though Richard hadn't the slightest idea why. That first shy, tentative kiss had quickly led to more kisses, which in turn had led to some surprisingly heated making out on the couch. Richard had been completely caught off guard when Jared had pulled back, looked him square in the eye, and said "You're so beautiful" without the slightest trace of irony. Coming from anyone else, it would have sounded incredibly cheesy - but somehow, from Jared, it sort of wasn't weird? And though all hands involved had dutifully stayed above the waist, Richard still found it was one of the hottest things he had ever experienced. It was turning him on a little bit now just thinking about it.

Richard was startled out of his reverie by a quiet rapping on the door.

"Come in, it's open."

And well, speak of the devil (not literally - that would probably summon Gilfoyle, Richard thought), here he was now.

"Hey Jared, what's up?"

"Not much. Are you busy? I could come back later if now isn't a good time." That was Jared, ever considerate of everyone's needs but his own. Truthfully, Richard did have an incredible amount of work to do, but as he'd come to discover over the past few days, virtually nothing took precedence over Jared. Besides, if he was just going to be sitting around thinking about Jared anyways, might as well have the man himself present.

"Nahhh, this can wait," Richard shoved his laptop aside with a casual air. "What did you want to do?"

"Well, if it isn't too much trouble," - and there Jared went again with the politeness - Richard wondered idly if he could kiss (or more) it out of him, "I was wondering if you'd want to teach me more JavaScript?"

\------

“So, up until now, all of the code we’ve been writing has basically run in order - one line after another. But let's say you had a chunk of code that you wanted to reuse often, what would you do?"

"I'm guessing copy pasting isn't the answer you're looking for?" Jared asked.

Richard smiled. Jared was really a natural at this. "Right, you'd want to create a function - which is basically a block of code that you can run over and over again, but with different inputs.” He entered some characters on the screen.

> function sayHello(name)  
>  {  
>     console.log("Hello " + name);  
>  }

“So this function…"

“Says hello?” Jared guessed.

“Yeah, but the cool part is when you actually use it. You can call the function like this,"

> sayHello("Jared");

“…so the input 'name' would be set to ‘Jared,’ and it would print out 'Hello Jared.’” Richard hit enter, and sure enough,

> Hello Jared

appeared on the screen.

Jared clapped his hands in delight. “Can I try?” he asked, already reaching over to add his own function call.

> sayHello("Richard");

He hit enter with a flourish, and sure enough,

> Hello Richard

appeared on the console as well.

“Hey, Richard. Could I add a function to an object just like we added numbers and text and stuff last time?"

Richard grinned. His boyfriend ( _boyfriend!_ ) was so smart.

“Yeah. What do you think that would look like?"

“Well, if I wanted to call a function on the ‘richard’ object…” Jared reached over and started to type.

> richard.kiss("Jared");

Richard looked at the code. “Well, that’s syntactically correct, but if you want to run it, you'd first need to define the kiss function over here… mmmph!” Richard’s explanation was drowned out by a pair of lips on his own. His hands still twitched to fix the incomplete code, but even that instinct was soon silenced as they moved upwards - seemingly of their own volition - to frame Jared’s face.

When Jared pulled back, his face had the slightest hint of a smirk on it.

“You already knew that, didn’t you?” Richard jibed.

And now Jared looked a bit sheepish. “I may have checked a copy of Eloquent JavaScript out of the library on my way home from visiting the senior center last Wednesday.” Richard did the math. Last Wednesday… that was two days before Jared had first asked him to teach him how to program.

“Jared, have you been _studying_  for our programming lessons?” This explained a lot. He knew Jared was smart, but the rate that Jared had been picking things up, and even guessing how certain things should work before Richard introduced them, had seemed a little bit out of this world. And then he had another thought. “Wait, how did you know I’d pick JavaScript? We didn’t pick a programming language until you asked me to teach you on Friday."

Now Jared looked downright uncomfortable. “Well, that may not have been the only book I checked out.” Richard could see it now. Jared had probably amassed stacks of programming books back in his room at the guest house.

Richard tentatively placed his hand on top of Jared's and did his best to look him in the eye.

“Jared, you’re not… you’re not just learning to program for me, are you? I mean, I’m happy to teach you, but I don’t want you to do this because you think that this is something that I want.” He took a deep breath, then continued. “You know that I... I liked you long before you asked me to teach you, right?"

Jared looked genuinely surprised at this.

“Oh my god, you actually didn’t know. You thought what - that I was overcome with passion after I saw your ability to manipulate objects and instantly fell in love with you?"

Jared’s jaw dropped. Richard continued, oblivious. “Heh, manipulating objects sounds kinda dirty, doesn’t it…” he trailed off as he noticed the stunned look on Jared’s face.

“You’re in love with me?” 

Richard fidgeted nervously with the hem of his hoodie. “Well, um, I mean… yeah."

Richard was literally bowled off of his seat by the force of the hug that Jared enveloped him in. Jared came down crashing down with him, and Jared’s chair quickly followed behind with a thump, narrowly missing Richard’s ankle by an centimeter. But Jared didn’t seem to notice or care, judging by the litany of soft kisses he was peppering across Richard’s face, arms, and neck - anywhere with exposed skin. Jared’s knee was pressing awkwardly into his ribs, and Richard was pretty sure he was going to have bruises from the fall, but he couldn’t find it in himself to care either as he captured Jared’s mouth with his own in a slow languorous kiss.

When they finally pulled apart, Jared was grinning from ear to ear as he dusted himself off and extended a hand to Richard to help him up.

“I love you too, but maybe we should get off the floor?"

\-------

For the first time since he had moved into the hacker hostel, Richard had occasion to appreciate why most grown men didn’t sleep in loft beds. Granted, it did provide him a nice view of Jared’s khaki-clad backside as he scampered up the ladder in front of him, but there wasn’t a lot of space up there or ( _crack!_  - Richard winced in sympathy as he watched Jared bang his head on the ceiling) room to move around.

“Oh my god, Jared. Are you okay?"

“Oh, I’m fine!” Jared called back, over-cheerfully. “Trust me, I’ve had much worse."

Richard knew that one day soon he would have to dig deeper into Jared’s past and coax out the truth about all of his thinly veiled references to trauma, but now didn’t feel like the right time. Right now, as Richard hoisted himself up onto the mattress, he had more pressing concerns. Like the fact that Jared Dunn - _Jared Dunn!_  - was in his bed.

And beds were where sex happened. At least, to other people.

Oh god.

Richard rolled his head from shoulder to shoulder and shook out his arms in a feeble attempt to calm himself down. He wanted this, for sure - he’d been thinking about it all week, but all of the googling he’d done seemed completely inadequate when faced with the vision in front of him - Jared Dunn, fully clothed, sitting cross legged and smiling in front of his pillows.

Richard steeled himself and clambered into a sitting position in front of Jared, who looked at him with concern.

“Richard, are you alright?"

Richard nodded and tried to look less petrified than he felt, toying with the edges of his hoodie again. “Yeah, you know, just uh… don’t get guests up here very often. Or well, uh, ever."

Jared looked pleasantly surprised at this, though Richard couldn’t fathom why.

Then he spoke. “Hang on, Richard, I have an idea."

“Huh? Where are you going?” But Jared was already scampering back down the ladder. Richard barely had a second to be disappointed - had he really scared Jared off that easily? - before Jared’s head reappeared above the railing, and this time, when he swung himself back onto the mattress, it was with Richard’s laptop in tow.

“Now we can just do what we were doing before, but up here."

Richard felt like a huge weight had been lifted from his shoulders. He could do programming. Programming was comfortable, programming was safe.

\-------

“…and if you wanted a function to have an output, you would add a return statement, like we did here.” Richard shifted the laptop where it was perched on his knees and pointed up at the screen from where he was nestled on his pillow next to Jared.

“So inputs go in the parentheses, and outputs go next to the ‘return’?” Jared asked.

“Yeah, you’ve got it.” Richard smiled.

“Okay, I think I want to try another one with an input.” Jared reached for the laptop as Richard helped him shift it onto his own lap.

Richard’s heart felt like it was about to burst as he watched Jared type out

> jared.loves("Richard");

Fighting the urge to point out that ‘loves’ technically wasn’t an action that could be performed by a function, Richard quickly added the inverse

> richard.loves("Jared");

and, watching as Jared’s eyes lit up with joy, followed it up with a function call similar to the one Jared had made earlier,

> jared.kiss("Richard");

Jared more than happily obliged.

\-------

Richard sighed contentedly and scrolled through his console log, looking at the function calls that had somehow magically delivered him and Jared to this point - half-naked, sticky, and satisfied.

> richard.remove("sweatshirt");  
>  jared.remove("vest");  
>  richard.remove("shirt");  
>  jared.remove("shirt");  
>  richard.remove("pants");  
>  jared.remove("pants");  
>  richard.touch("Jared");

“Where?” Richard had asked, wide-eyed.

“Anywhere you want to.”

> alkdfjalksdjfldkajsflk;ajdf;lkjadfslafdsjlk

(After that point, the laptop had been unceremoniously shut and relegated to a spot in the corner.)

"Say, Richard.” Jared looked up at Richard, glowing with his post-coital haze.

"Yeah?"

"What are your thoughts on anal penetration?"

Richard gulped and sputtered. The idea both excited and terrified him in equal measure. There was no way he was ready for that yet, though - this whole thing with Jared was so new, and he didn't want to fuck it up, so to speak.

Jared seemed to sense his hesitation, and reached out a comforting hand, interlacing his fingers with Richard's. “Hey, it's ok.”

Then, with a bit of a glint in his eye, he added, "Maybe let’s table that discussion for when you teach me back-end programming?"

**Author's Note:**

> Stay tuned for the third installment, Richard Gets Railed!
> 
> ...that's a joke - it's a horrible Ruby on Rails pun (Rails is a back-end framework). Alas, my Ruby skills are pretty rusty and I've never actually written porn - so if anyone wants to use that title, it's up for grabs!


End file.
